<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;

?>

<!DOCTYPE html>
<html>
<head>
  <title></title>
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
  <meta name="apple-mobile-web-app-capable" content="yes" />
  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
  <meta name="format-detection" content="telephone=no" />
  <link href="/css/style.css" rel="stylesheet">
  <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
</head>
<body>

    <div class="registration-form">
         
        <div class="registration-form">
         
         
        <?php $form = ActiveForm::begin(['id'=>'form111']); ?>


        
           <div  id="traffic" class="view">
    <div class="wapper2" >
        <img class="jt" src="/img/jt.png" style="width: 100px;position: absolute;left: 50%;margin-left: -50px;margin-top: -17px;">
        <img src="/img/n1.png">
	<ul>
        <li>
            <span>来程信息</span>
        </li>
		<li>
            <span>交通工具</span>
            <input type="radio" name="Registration[come_transportation]" value="飞机" <?= $model->come_transportation=='飞机'?'checked':''?>> <span>飞机</span>
            <input type="radio" name="Registration[come_transportation]" value="火车" <?= $model->come_transportation=='火车'?'checked':''?>> <span>火车</span>
            <input type="radio" name="Registration[come_transportation]" value="自驾" <?= $model->come_transportation=='自驾'?'checked':''?>> <span>自驾</span>
		</li>
	
		<li id='std1'>
                <span>出发城市</span>
                <input type="text" id="departure_city"   name="Registration[departure_city]" value="<?= $model->departure_city?>">
            
		</li>
	
		<li id='std2'>
                <span>抵达地点</span>
                <input type="text" id="arrival_location"   name="Registration[arrival_location]" value="<?= $model->arrival_location?>">
                 
					
		</li>
	
		<li id='std3'>
                <span>航班号/车次</span>
					<input type="text" id="come_flight_number"   name="Registration[come_flight_number]" value="<?= $model->come_flight_number?>">
		</li>
	
		<li id='std4'>
				<span>抵达时间</span>
					<input type="text" id="arrival_time"  name="Registration[arrival_time]" value="<?= $model->arrival_time?>">
		</li>
		<li id='std5'>
                <span>是否接机</span>
                <input type="hidden" name="Registration[is_aircraft]" value="">
                    <input type="radio" name="Registration[is_aircraft]" style='padding-left:10px' value="是" <?= $model->is_aircraft=='是'?'checked':''?>> <span>是</span>
                    <input type="radio" name="Registration[is_aircraft]" style='padding-left:10px' value="否" <?= $model->is_aircraft=='否'?'checked':''?>> <span>否</span>
		</li>
	
	</ul>
</div>
</div>
       
        <input id="next" style="" value="" type="button">




 <?php ActiveForm::end(); ?>
          
        
    </div>
         
          
        
    </div>

</body>
</html>
<script>
$("input[name='Registration[come_transportation]']:checked").click(function(){
	
	var tans=$("input[name='Registration[come_transportation]']:checked").val();
	if(tans=='自驾'){
		$('#std1').remove();
		$('#std2').remove();
		$('#std3').remove();
		$('#std4').remove();
		$('#std5').remove();
		
	}
	
	
})



$('#next').click(function(){
	var departure_city=$('#departure_city').val();if(departure_city==''){alert('请填写出发城市');return false;}
	var arrival_location=$('#arrival_location').val();if(arrival_location==''){alert('请填写抵达地点');return false;}
	var come_flight_number=$('#come_flight_number').val();if(come_flight_number==''){alert('请填写航班号/车次');return false;}
	var arrival_time=$('#arrival_time').val();if(arrival_time==''){alert('请填写抵达时间');return false;}
	$('#next').submit();
	
	
})



</script>